import { IKeyFrame } from "./IKeyFrame";
import { IMemberInfo } from "./IMemberInfo";
import { IResult } from "./IResult";

/**
 * 服务端接收事件
 */
export interface IC2SEventCallbackMap {
  "user_list": (room_id: string, cb: (r: IResult<IMemberInfo[]>) => void) => void;
  "join_room": (session_id: string, room_id: string, cb: (r: IResult<{ members: IMemberInfo[]; }>) => void) => void;
  "exit_room": (room_id: string, cb: (r: IResult) => void) => void;
  "negotiation": (target: IMemberInfo, arg: RTCSessionDescriptionInit, cb: (r: IResult) => void) => void;
  "ice_candidate": (target: IMemberInfo, candidate: RTCIceCandidate, cb: (r: IResult) => void) => void;
  "key_frames": (key_frames: IKeyFrame[], cb: () => void) => void;
}
